<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/graphicsview/qgraphicsitem.cpp -->
<head>
  <title>Qt 4.3: QAbstractGraphicsShapeItem Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QAbstractGraphicsShapeItem Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QAbstractGraphicsShapeItem class provides a common base for all path items. <a href="#details">More...</a></p>
<pre> #include &lt;QAbstractGraphicsShapeItem&gt;</pre><p>Inherits <a href="qgraphicsitem.html">QGraphicsItem</a>.</p>
<p>Inherited by <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a>, <a href="qgraphicspathitem.html">QGraphicsPathItem</a>, <a href="qgraphicspolygonitem.html">QGraphicsPolygonItem</a>, <a href="qgraphicsrectitem.html">QGraphicsRectItem</a>, and <a href="qgraphicssimpletextitem.html">QGraphicsSimpleTextItem</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qabstractgraphicsshapeitem-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qabstractgraphicsshapeitem.html#QAbstractGraphicsShapeItem">QAbstractGraphicsShapeItem</a></b> ( QGraphicsItem * <i>parent</i> = 0 )</li>
<li><div class="fn"/><b><a href="qabstractgraphicsshapeitem.html#dtor.QAbstractGraphicsShapeItem">~QAbstractGraphicsShapeItem</a></b> ()</li>
<li><div class="fn"/>QBrush <b><a href="qabstractgraphicsshapeitem.html#brush">brush</a></b> () const</li>
<li><div class="fn"/>QPen <b><a href="qabstractgraphicsshapeitem.html#pen">pen</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qabstractgraphicsshapeitem.html#setBrush">setBrush</a></b> ( const QBrush &amp; <i>brush</i> )</li>
<li><div class="fn"/>void <b><a href="qabstractgraphicsshapeitem.html#setPen">setPen</a></b> ( const QPen &amp; <i>pen</i> )</li>
</ul>
<ul>
<li><div class="fn"/>114 public functions inherited from <a href="qgraphicsitem.html#public-functions">QGraphicsItem</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>1 static public member inherited from <a href="qgraphicsitem.html#static-public-members">QGraphicsItem</a></li>
<li><div class="fn"/>23 protected functions inherited from <a href="qgraphicsitem.html#protected-functions">QGraphicsItem</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QAbstractGraphicsShapeItem class provides a common base for all path items.</p>
<p>This class does not fully implement an item by itself; in particular, it does not implement <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() and <a href="qgraphicsitem.html#paint">paint</a>(), which are inherited by <a href="qgraphicsitem.html">QGraphicsItem</a>.</p>
<p>You can subclass this item to provide a simple base implementation of accessors for the item's pen and brush.</p>
<p>See also <a href="qgraphicsrectitem.html">QGraphicsRectItem</a>, <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a>, <a href="qgraphicspathitem.html">QGraphicsPathItem</a>, <a href="qgraphicspolygonitem.html">QGraphicsPolygonItem</a>, <a href="qgraphicstextitem.html">QGraphicsTextItem</a>, <a href="qgraphicslineitem.html">QGraphicsLineItem</a>, <a href="qgraphicspixmapitem.html">QGraphicsPixmapItem</a>, and <a href="graphicsview.html">The Graphics View Framework</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QAbstractGraphicsShapeItem"></a>QAbstractGraphicsShapeItem::QAbstractGraphicsShapeItem ( <a href="qgraphicsitem.html">QGraphicsItem</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>. <i>parent</i> is passed to <a href="qgraphicsitem.html">QGraphicsItem</a>'s constructor.</p>
<h3 class="fn"><a name="dtor.QAbstractGraphicsShapeItem"></a>QAbstractGraphicsShapeItem::~QAbstractGraphicsShapeItem ()</h3>
<p>Destroys a <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>.</p>
<h3 class="fn"><a name="brush"></a><a href="qbrush.html">QBrush</a> QAbstractGraphicsShapeItem::brush () const</h3>
<p>Returns the item's brush, or an empty brush if no brush has been set.</p>
<p>See also <a href="qabstractgraphicsshapeitem.html#setBrush">setBrush</a>().</p>
<h3 class="fn"><a name="pen"></a><a href="qpen.html">QPen</a> QAbstractGraphicsShapeItem::pen () const</h3>
<p>Returns the item's pen. If no pen has been set, this function returns QPen(), a default black solid line pen with 0 width.</p>
<p>See also <a href="qabstractgraphicsshapeitem.html#setPen">setPen</a>().</p>
<h3 class="fn"><a name="setBrush"></a>void QAbstractGraphicsShapeItem::setBrush ( const <a href="qbrush.html">QBrush</a> &amp; <i>brush</i> )</h3>
<p>Sets the item's brush to <i>brush</i>.</p>
<p>The item's brush is used to fill the item.</p>
<p>If you use a brush with a <a href="qgradient.html">QGradient</a>, the gradient is relative to the item's coordinate system.</p>
<p>See also <a href="qabstractgraphicsshapeitem.html#brush">brush</a>().</p>
<h3 class="fn"><a name="setPen"></a>void QAbstractGraphicsShapeItem::setPen ( const <a href="qpen.html">QPen</a> &amp; <i>pen</i> )</h3>
<p>Sets the pen for this item to <i>pen</i>.</p>
<p>The pen is used to draw the item's outline.</p>
<p>See also <a href="qabstractgraphicsshapeitem.html#pen">pen</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
